package DBTasks;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

public class FosterInformation extends DBTask{

	private static ArrayList<String[]> fosterers;

	public static ArrayList<String[]> listFosterInfo() {

		try {
			
			Statement nameStatement = con.createStatement();
		    ResultSet rsName = nameStatement.executeQuery("select Name, Phone from Fosterer");
		    
			fosterers = new ArrayList<String[]>();
			
			while(rsName.next()){
				String[] list = new String[2];
				list[0] = rsName.getString(1);
				list[1] = rsName.getString(2);
				fosterers.add(list);
			}

		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return fosterers;

	}

}
